package com.globant.google.mendoza.malbec;

public class BuyerGiftMessage implements BuyerInformation {

  /** The gift message.
   */
  private String giftMessage;

  /** Creates the data that the buyer posts when entering a gift message before
   *  placing an order.*/
  public BuyerGiftMessage(final String theGiftMessage) {   
    if (theGiftMessage == null) {
      throw new IllegalArgumentException(
          "the gift certificate code cannot be null");
    }
    giftMessage = theGiftMessage;
  }

  public String getGiftMessage() {
    return giftMessage;
  }

  public void execute(BuyerVisitor visitor) {
    visitor.enterGiftMessage(this);
  }
}
